<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="view/admin/style/basic.css" />
<link rel="stylesheet" type="text/css" href="view/admin/style/attr.css" />
<script type="text/javascript" src="view/admin/js/ajax.js"></script>
<script type="text/javascript" src="view/admin/js/attr.js"></script>
<title>Insert title here</title>
</head>
<body>
    <h2><a href="?a=attr">返回自定义属性列表</a>商品 -- 添加自定义属性</h2>
    <form method="post" name="add" action="?a=attr&m=add">
        <dl class="form">
            <dd>属性名称：<input type="text" name="name" class="text" onblur="ajaxCheckAttr();"/> <span style="color:red">[必填]</span>( * 2~4位)</dd>
            <dd id="warning" style="color:red;display:none;">自定义属性名称已被占用!</dd>
            <dd>选择方式：<input type="radio" name="way" value="0" checked="checked"/>单选 <input type="radio" name="way" value="1" />多选</dd>
            <dd><span class="middle">属性项目：</span><textarea name="item"></textarea> <span class="middle">( *每个项目用'|'线隔开，如黑色|白色|红色)</span></dd>
            <dd>请选择以下的关联项目:</dd>
            {foreach from=$allNav key=key item=value}
            <dd>{$value->name}</dd>
            {if $value->child}
            <dd>{html_checkboxes name=nav options=$value->child}</dd>
            {/if}
            {foreachelse}
            <dd>没有任何类别可以选择，请先<a href="?a=nav&m=add">添加</a>一些类别</dd>
            {/foreach}
            <dd><input type="submit" name="send" value="新增自定义属性" class="submit" onclick="return checkAddAttr();"/></dd>
        </dl>
    </form>
</body>
</html>